﻿#if UNITY_EDITOR
using System;
using System.Collections.Generic;
using Runtime.Net;
using UnityEngine;

namespace Runtime.Settings {

    [Serializable]
    public class DFR_NetConnectionProjectSettings : ScriptableObject {

        public const string EDITOR_LABEL = "NetConnection";

        public static readonly string EDITOR_FIELD_NAME_LIST = nameof(m_List);

        [SerializeField]
        [Header("连接列表")]
        private List<DFR_NetConnectionSetting> m_List;
        public IEnumerable<DFR_NetConnectionSetting> List => m_List;
        public DFR_NetConnectionSetting Get(int index) {
            return m_List[index];
        }
    }
}

namespace Runtime.Net {
    [Serializable]
    public class DFR_NetConnectionSetting {

        [SerializeField]
        [Header("名称")]
        private string m_Name;
        public string Name => m_Name;

        [SerializeField]
        [Header("URL")]
        private string m_URL;
        public string URL => m_URL;

        [SerializeField]
        [Header("是否是安全连接,勾选时使用wss协议")]
        private bool m_IsSecure;
        public bool IsSecure => m_IsSecure;
    }
}
#endif
